/*
 * ChooseLocalPictureActivity.java
 * business
 *
 * Created by ChenTao on 2017/5/16.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.chooselocalpicture;

import android.app.Activity;
import android.content.Intent;

import com.yidiandao.business.R;
import com.yidiandao.business.base.BaseActivity;
import com.yidiandao.business.utils.ActivityUtils;

/** 本地图片多选 */
public class ChooseLocalPictureActivity extends BaseActivity {

    private ChooseLocalPictureFragment mFragment;

    public static void actionStart(Activity activity) {
        Intent intent = new Intent(activity, ChooseLocalPictureActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void initFragment() {
        mFragment =
                (ChooseLocalPictureFragment)
                        getSupportFragmentManager()
                                .findFragmentById(R.id.container_choose_local_pic);
        if (mFragment == null) {
            mFragment = ChooseLocalPictureFragment.getInstance();
            ActivityUtils.addFragmentToActivity(
                    getSupportFragmentManager(), mFragment, R.id.container_choose_local_pic);
        }
    }

    @Override
    protected void initPresenter() {
        new ChooseLocalPicturePresenter(mFragment);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_choose_local_pic;
    }
}
